# Packager: Justin "juster" Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 86624 2013-03-20 17:34:49Z eric $

pkgname=perl-xml-xpath
pkgver=1.13
pkgrel=6
pkgdesc="a set of modules for parsing and evaluating XPath statements"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl' 'perl-xml-parser>=2.23')
url=https://metacpan.org/release/XML-XPath
source=("http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/XML-XPath-${pkgver}.tar.gz")
md5sums=(b5919d9220d83982feb6e2321850c5d7)
sha512sums=(c5af746f36562803e42c5afb63b533b59ecaa263977c5ef4bf6488b7597cae334bb3b0c644acdfbb453e87a22ba9a785df3f81b95faec89d974704d6f04f6503)
_distdir="${srcdir}/XML-XPath-${pkgver}"

build()
(
    export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd "$_distdir"
    /usr/bin/perl Makefile.PL
    make
)

check()
(
    export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd "$_distdir"
    make test
)

package() {
    cd "$_distdir"
    make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
